# "1.点击“添加标签组”，填写标签组名称“华为老大”，标签排序255。
# 2.点击“保存保存标签组信息”，保存成功。"
# #
import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import*
testCase27='DBshop027_新增标签组流程'
import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import*

firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu3(firefox,'商品管理','商品标签','商品标签分组')
firefox.find_element_by_partial_link_text('添加标签组').click()#点击添加标签组
firefox.find_element_by_name('tag_group_name').send_keys('华为老大')
firefox.find_element_by_name('tag_group_sort').clear()#清除
firefox.find_element_by_name('tag_group_sort').send_keys('255')
firefox.find_element_by_xpath('//button[2]').click() #点击保存标签组信息

time.sleep(4)

try:
    firefox.find_element_by_xpath('//td[text()="华为老大"]')#断言华为老大
    writeLog('%s 测试通过'%testCase27)
except:
    writeLog('%s 测试不通过'%testCase27)
    getPhoto(firefox)
firefox.quit()


